# 作者：宋安康
# 开发时间：2023/5/22 11:33
import socket
import sys
s =socket.socket()
try:
    s.connect(('127.0.0.1',8000))
except Exception as e:
    print('Can\'t find the Sever please try again')
    sys.exit()
while True:
    c=input('Input the content you want to send:')
    s.sendall(c.encode())
    data=s.recv(1024)
    data=data.decode()
    print('Received:',data)
    if c.lower()=='bye':
        break
s.close()
